package com.breakfast.fun.ui.user.address;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.user.Result;
import com.breakfast.fun.data.entity.user.address.AddressData;
import com.breakfast.fun.data.entity.user.address.BuildingData;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/9/15.
 */
public interface EditAddressContract {
    interface Model extends BaseModel {
        Observable<Result> getDeleteAddressModel(@FieldMap Map<String, String> map);

        Observable<Result> getUpdateAddressModel(@FieldMap Map<String, String> map);
    }

    interface View extends BaseView {
        void showSuccess(String msg);

        void setBuilding(BuildingData buildingData);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void editAddress(AddressData addressData);

        public abstract void deleteAddress(String buildingId);

        public abstract void chooseBuilding(BuildingData buildingData);
    }
}
